home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 3.iso / toolbox / sifttree < prev    next >
Text File  |  1996-11-11  |  1KB  |  60 lines

  1. #!/bin/sh
  2. #                 ~4Dgifts/toolbox/sifttree shell script
  3. #
  4. # wherever this script is run from, the ~4Dgifts/toolbox/.oasisrc 
  5. # file needs to be in the same directory;
  6. #
  7. # and, if necessary, explicitly [re]define the following 2 environment 
  8. # variables:
  9. #     TOOLBOXPATH is wherever the CD is mounted on yer machine,
  10. #     OASISIIIPATH is wherever you have put the oasisIII binary.
  11. #
  12.  
  13. SERVERSTARTED="0"
  14.  
  15. TOOLBOXPATH=`pwd`
  16. OASISIIIPATH=`pwd`/searchtools
  17. LD_LIBRARY_PATH=/lib:/usr/lib:`pwd`/searchtools/lib
  18. export LD_LIBRARY_PATH
  19.  
  20.  
  21. # have to set paths locations for oksvr:
  22. FULPATH=$OASISIIIPATH
  23. export FULPATH
  24.  
  25. # oasisIII's app-defaults trickee-dick "short-cut":
  26. if test -n "$XUSERFILESEARCHPATH"
  27. then
  28.     XUSERFILESEARCHPATH="$OASISIIIPATH/%N:$XUSERFILESEARCHPATH"
  29. else
  30.     XUSERFILESEARCHPATH="$OASISIIIPATH/%N"
  31. fi
  32. export XUSERFILESEARCHPATH
  33.  
  34. # and the location of xpsview for oasisIII:
  35. XPSVIEW_ROOT=$TOOLBOXPATH/.util/xpsview
  36. export XPSVIEW_ROOT 
  37.  
  38. # see if server is already running
  39. if /bin/ps -e 2>/dev/null | /bin/grep oksvr > /dev/null 2>&1 ; then
  40.     SERVERSTARTED="0"
  41. else
  42.     $OASISIIIPATH/oksvr &
  43.     SERVERSTARTED="1"
  44. fi
  45.  
  46. # comment the OKSERVER environment variable out if you 
  47. # want people to access oksvr/oasisIII from another machine.
  48. # (oasisIII/oksvr are a client/server relationship.)
  49. OKSERVER=localhost
  50. export OKSERVER
  51.  
  52. # did we start an oksvr process...if so kill on exit
  53. if [ $SERVERSTARTED -eq "1" ] 
  54. then
  55.     $OASISIIIPATH/oasisIII -k &
  56. else
  57.     $OASISIIIPATH/oasisIII &
  58. fi
  59.  
  60.